<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableFilmComments extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('comments', function (Blueprint $table) {
            $table->increments('cid');       //自增长ID
            $table->integer('ctid');
            $table->integer('fid')->unsigned();      //影片ID
            $table->integer('id');       //用户ID
            $table->string('content');       //评论内容
            $table->integer('mark');         //评论分数,如果按10分算，获取值请X10，调用时再除以10
            $table->date('com_time');         //评论时间
            $table->string('title');           //影片标题
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('comments');
    }
}
